trigger DeleteCBRecord on CityBudget__c(before delete) {
     List<HospitalAllocation__c> DeleteHA = new List<HospitalAllocation__c>();
     List<ID> Ids = new List<ID>();
    if(system.trigger.isdelete){
         for (CityBudget__c cb : Trigger.old)
         {
             Ids.add(cb.id);
         }
         List<HospitalAllocation__c> HAList = [Select id From HospitalAllocation__c Where CityBudget__c in:Ids];
         Delete HAList;
    }
}